import request from "@/utils/request";

// 抄表流水

// 抄表流水列表 错误码 20002
export function postemeterList(data) {
  const { pageNum, pageSize, ...other } = data;
  return request({
    url: `/device/emeter-data/list?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: "post",
    data: { ...other },
  });
}

// 抄表流水列表-水表 错误码 200022
export function postWaterList(data) {
  const { pageNum, pageSize, ...other } = data;
  return request({
    url: `/wmeter/data/flow/list?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: "post",
    data: { ...other },
  });
}

// 电表-抄表流水页面图形数据接口 错误码 200023
export function postelectricityChart(data) {
  return request({
    url: `/device/emeter-data/energyconsumption/list`,
    method: "post",
    data,
  });
}

// 水表-抄表流水页面图形数据接口 错误码 200024
export function postwaterChart(data) {
  return request({
    url: `/wmeter/data/waterconsumption/list`,
    method: "post",
    data,
  });
}

// 水表-抄表流水页面图形数据接口 错误码 200025
export function detail(data) {
  const { id, deviceCode } = data;
  return request({
    url: `/device/emeter-data/detail/?id=${id}&deviceCode=${deviceCode}`,
    method: "get",
  });
}
